<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
    <th:block th:if="!${#maps.isEmpty(dataMap['list'])}" th:each="examQuestionRecord : ${dataMap['list']}">
        <div class="swiper-slide question-root-box" th:attrappend="data-no=${dataMap['pageNum']},data-type=${examQuestionRecord['templateName']},data-id=${examQuestionRecord['id']},data-qt=${examQuestionRecord['questionScoreJson']['haveSubTrunk']},data-val=${examQuestionRecord['questionScoreJson']['type']},data-index=${examQuestionRecord['webIndex']}">
            <div class="content exam-st-cont">
                <section class="content-padded pl5 pr5">
                    <div class="question-info-txt__wrap">
                        <div class="fs7 c-333" th:utext="${examQuestionRecord['webIndex']}+'、'+${examQuestionRecord['examQuestion']['templateContent']['trunk']}+'('+${examQuestionRecord['questionScore']}+'分)'"></div>
                    </div>
                    <div class="pt5">
                        <!-- 无子试题 -->
                        <th:block th:if="!${examQuestionRecord['questionScoreJson']['haveSubTrunk']}">
                            <!-- 选项题 -->
                            <th:block th:if="${examQuestionRecord['questionScoreJson']['single']} or ${examQuestionRecord['questionScoreJson']['multi']} or ${examQuestionRecord['questionScoreJson']['judge']}">
                                <ol class="ex-option-li pb5 ex-op-radio-li">
                                    <li>
                                        <th:block th:each="option : ${examQuestionRecord['examQuestion']['templateContent']['optionContextList']}">
                                            <th:block th:if="${#maps.isEmpty(examQuestionRecord['userAnswerJson'])} or ${#lists.isEmpty(examQuestionRecord['userAnswerJson']['answerOptList'])}">
                                                <label class="click-option-box answer-box" th:attrappend="data-type=${examQuestionRecord['questionScoreJson']['type']}">
                                                    <input th:disabled="${status}==2" th:type="${examQuestionRecord['questionScoreJson']['multi']} ? 'checkbox':'radio'" class="opInp opInt-radio" th:value="${option['key']}">
                                                    <aside th:classappend="${examQuestionRecord['questionScoreJson']['multi']} ? 'opInt-checkbox' : 'opInt-radio'" class="opInp">
                                                        <small th:text="${option['key']}"></small>
                                                    </aside>
                                                    <span class="opMiddle"></span>
                                                    <span class="opTxt">
                                                        <span th:utext="${option['value']}"></span>
                                                    </span>
                                                </label>
                                            </th:block>
                                            <th:block th:if="!${#maps.isEmpty(examQuestionRecord['userAnswerJson'])} and !${#lists.isEmpty(examQuestionRecord['userAnswerJson']['answerOptList'])}">
                                                <label th:classappend="${#lists.contains(examQuestionRecord['userAnswerJson']['answerOptList'],option['key'])} ? 'current':''" class="click-option-box answer-box" th:attrappend="data-type=${examQuestionRecord['questionScoreJson']['type']}">
                                                    <input th:disabled="${status}==2" th:type="${examQuestionRecord['questionScoreJson']['multi']} ? 'checkbox':'radio'" class="opInp opInt-radio" th:value="${option['key']}">
                                                    <aside th:classappend="${examQuestionRecord['questionScoreJson']['multi']} ? 'opInt-checkbox' : 'opInt-radio'" class="opInp">
                                                        <small th:text="${option['key']}"></small>
                                                    </aside>
                                                    <span class="opMiddle"></span>
                                                    <span class="opTxt">
                                                        <span th:utext="${option['value']}"></span>
                                                    </span>
                                                </label>
                                            </th:block>
                                        </th:block>
                                    </li>
                                </ol>
                            </th:block>
                            <!-- 填空题 -->
                            <th:block th:if="${examQuestionRecord['questionScoreJson']['blank']}">
                                <section class="pt5 pl5 pr5 exam-tk-bx">
                                    <section class="list-block">
                                        <ul>
                                            <li th:each="option : ${examQuestionRecord['examQuestion']['templateContent']['optionList']}">
                                                <div class="item-content">
                                                    <div class="item-inner">
                                                        <div class="item-title" th:text="${option}"></div>
                                                        <div class="item-input">
                                                            <th:block th:if="${#maps.isEmpty(examQuestionRecord['userAnswerJson'])} or ${#lists.isEmpty(examQuestionRecord['userAnswerJson']['answerBlankList'])}">
                                                                <input th:disabled="${status}==2" class="data-answers-2" type="text" placeholder="输入对应答案"/>
                                                            </th:block>
                                                            <th:block th:if="!${#maps.isEmpty(examQuestionRecord['userAnswerJson'])} and !${#lists.isEmpty(examQuestionRecord['userAnswerJson']['answerBlankList'])}">
                                                                <th:block th:each="answer,bIndex:${examQuestionRecord['userAnswerJson']['answerBlankList']}">
                                                                    <input th:if="${bIndex.count}==${option}" th:value="${answer}" th:disabled="${status}==2" class="data-answers-2" type="text" placeholder="输入对应答案"/>
                                                                </th:block>
                                                            </th:block>
                                                        </div>
                                                    </div>
                                                </div>
                                            </li>
                                        </ul>
                                    </section>
                                </section>
                            </th:block>
                            <!-- 简答题 -->
                            <th:block th:if="${examQuestionRecord['questionScoreJson']['special']}">
                                <section class="pt5 pl5 pr5 exam-tk-bx">
                                    <section class="list-block">
                                        <ul>
                                            <li>
                                                <div class="item-content tqPopTxtarea">
                                                    <div class="item-input">
                                                        <textarea th:text="!${#maps.isEmpty(examQuestionRecord['userAnswerJson'])} and !${#strings.isEmpty(examQuestionRecord['userAnswerJson']['specialAnswer'])}?${examQuestionRecord['userAnswerJson']['specialAnswer']}:''" th:disabled="${status}==2" class="data-answers-2" placeholder="输入你的答案"></textarea>
                                                    </div>
                                                </div>
                                            </li>
                                        </ul>
                                    </section>
                                </section>
                            </th:block>
                            <section th:if="${status}==2" class="pt5 pl5 pr5 exam-tk-bx">
                                <section class="list-block">
                                    <ul>
                                        <li>
                                            <div class="item-content tqPopTxtarea">
                                                <div class="item-input c-red" th:text="'得分：'+${examQuestionRecord['userScore']}+'分'">
                                                </div>
                                            </div>
                                        </li>
                                    </ul>
                                </section>
                            </section>
                        </th:block>
                        <!-- 有子试题 section-->
                        <th:block th:if="${examQuestionRecord['questionScoreJson']['haveSubTrunk']}">
                            <div th:each="subTrunk,subIndex : ${examQuestionRecord['examQuestion']['templateContent']['subTrunkList']}" th:attrappend="data-qtype=${subTrunk['type']}" class="content-padded pl5 pr5 sub-trunk-box">
                                <div class="question-info-txt__wrap">
                                    <div class="fs7 c-333" th:utext="${subIndex.count}+'、'+${subTrunk['trunk']}+'('+${subTrunk['score']}+'分)'"></div>
                                </div>
        
                                <div class="pt5">
                                    <!-- 选项题 -->
                                    <th:block th:if="${subTrunk['single']} or ${subTrunk['multi']} or ${subTrunk['judge']}">
                                        <ol class="ex-option-li pb5 ex-op-radio-li">
                                            <li>
                                                <th:block th:each="option : ${subTrunk['optionContextList']}">
                                                    <th:block th:if="${#maps.isEmpty(subTrunk['userAnswerJson'])} or ${#lists.isEmpty(subTrunk['userAnswerJson']['answerOptList'])}">
                                                        <label class="click-option-box answer-box" th:attrappend="data-type=${subTrunk['type']}">
                                                            <input th:disabled="${status}==2" th:type="${subTrunk['multi']} ? 'checkbox':'radio'" class="opInp opInt-radio" th:value="${option['key']}">
                                                            <aside th:classappend="${subTrunk['multi']} ? 'opInt-checkbox' : 'opInt-radio'" class="opInp">
                                                                <small th:text="${option['key']}"></small>
                                                            </aside>
                                                            <span class="opMiddle"></span>
                                                            <span class="opTxt">
                                                                <span th:utext="${option['value']}"></span>
                                                            </span>
                                                        </label>
                                                    </th:block>
                                                    <th:block th:if="!${#maps.isEmpty(subTrunk['userAnswerJson'])} and !${#lists.isEmpty(subTrunk['userAnswerJson']['answerOptList'])}">
                                                        <label th:classappend="${#lists.contains(subTrunk['userAnswerJson']['answerOptList'],option['key'])}?'current':''" class="click-option-box answer-box" th:attrappend="data-type=${subTrunk['type']}">
                                                            <input th:disabled="${status}==2" th:type="${subTrunk['multi']} ? 'checkbox':'radio'" class="opInp opInt-radio" th:value="${option['key']}">
                                                            <aside th:classappend="${subTrunk['multi']} ? 'opInt-checkbox' : 'opInt-radio'" class="opInp">
                                                                <small th:text="${option['key']}"></small>
                                                            </aside>
                                                            <span class="opMiddle"></span>
                                                            <span class="opTxt">
                                                                <span th:utext="${option['value']}"></span>
                                                            </span>
                                                        </label>
                                                    </th:block>
                                                </th:block>
                                            </li>
                                        </ol>
                                    </th:block>
                                    <!-- 填空题 -->
                                    <th:block th:if="${subTrunk['blank']}">
                                        <section class="pt5 pl5 pr5 exam-tk-bx">
                                            <section class="list-block">
                                                <ul>
                                                    <li th:each="option : ${subTrunk['optionList']}">
                                                        <div class="item-content">
                                                            <div class="item-inner">
                                                                <div class="item-title" th:text="${option}"></div>
                                                                <div class="item-input">
                                                                    <th:block th:if="${#maps.isEmpty(subTrunk['userAnswerJson'])} or ${#lists.isEmpty(subTrunk['userAnswerJson']['answerBlankList'])}">
                                                                        <input th:disabled="${status}==2" class="data-answers-2" type="text" placeholder="输入对应答案"/>
                                                                    </th:block>
                                                                    <th:block th:if="!${#maps.isEmpty(subTrunk['userAnswerJson'])} and !${#lists.isEmpty(subTrunk['userAnswerJson']['answerBlankList'])}">
                                                                        <th:block th:each="answer,bIndex:${subTrunk['userAnswerJson']['answerBlankList']}">
                                                                            <input th:if="${bIndex.count}==${option}" th:value="${answer}" th:disabled="${status}==2" class="data-answers-2" type="text" placeholder="输入对应答案"/>
                                                                        </th:block>
                                                                    </th:block>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </li>
                                                </ul>
                                            </section>
                                        </section>
                                    </th:block>
                                    <!-- 简答题 -->
                                    <th:block th:if="${subTrunk['special']}">
                                        <section class="pt5 pl5 pr5 exam-tk-bx">
                                            <section class="list-block">
                                                <ul>
                                                    <li>
                                                        <div class="item-content tqPopTxtarea">
                                                            <div class="item-input">
                                                                <textarea th:text="!${#maps.isEmpty(subTrunk['userAnswerJson'])} and !${#strings.isEmpty(subTrunk['userAnswerJson']['specialAnswer'])}?${subTrunk['userAnswerJson']['specialAnswer']}:''" th:disabled="${status}==2" class="data-answers-2" placeholder="输入你的答案"></textarea>
                                                            </div>
                                                        </div>
                                                    </li>
                                                </ul>
                                            </section>
                                        </section>
                                    </th:block>
                                    <section th:if="${status}==2" class="pt5 pl5 pr5 exam-tk-bx">
                                        <section class="list-block">
                                            <ul>
                                                <li>
                                                    <div class="item-content tqPopTxtarea">
                                                        <div th:if="${#maps.isEmpty(subTrunk['userAnswerJson'])}" class="item-input c-red">得分：0分</div>
                                                        <div th:if="!${#maps.isEmpty(subTrunk['userAnswerJson'])}" class="item-input c-red" th:text="'得分：'+${subTrunk['userAnswerJson']['userScore']}+'分'"></div>
                                                    </div>
                                                </li>
                                            </ul>
                                        </section>
                                    </section>
                                </div>
                            </div>
                        </th:block>
                    </div>
                </section>
            </div>
        </div>
    </th:block>
    <th:block th:if="${dataMap['pages']}>1 and ${dataMap['pageNum']}==1">
        <th:block th:each="pageNo : ${#numbers.sequence(2,dataMap['pages'])}">
            <th:block th:each="index : ${#numbers.sequence(1,10)}">
                <th:block th:if="((${pageNo}-1) * 10 + ${index}) <= ${dataMap['total']}">
                    <div th:attrprepend="data-no=${pageNo},data-index=(${pageNo}-1) * 10 + ${index}" class="swiper-slide question-root-box temporary-box"></div>
                </th:block>
            </th:block>
        </th:block>
    </th:block>
</html>